package jsp_0810;

import java.io.*;

import javax.servlet.*;
import javax.servlet.http.*;

public class OldServlet extends HttpServlet {


	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		String age = req.getParameter("age");
		String city = req.getParameter("city");
		
		PrintWriter pw = resp.getWriter();
		pw.println("I'm Old style servlet");
		if(Integer.parseInt(age) < 20)
			pw.println("You're child");
		else
			pw.println("You're Adult");
		pw.println("You live in " + city);
		pw.close();
	}
	
	
}
